package v2

import ll "go-arch/data-structures/linked-list"

type Node interface {
	GetData() (content interface{})
	SetData(content interface{})
}

// 迭代器
type Iterator interface {
	Next() interface{}
	HasNext() bool
}

type Vertex struct {
	Info            interface{}
	AdjacentEdges   *ll.LinkedList
	ReAdjacentEdges *ll.LinkedList
	Visited         bool
	VertexPosition  Node
	GraphType       GraphType
	AppInfo         interface{}
}

func NewVertex(graph Graph, info interface{}) *Vertex {
	v := &Vertex{
		Info:            info,
		AdjacentEdges:   ll.NewLinkedList(16),
		ReAdjacentEdges: ll.NewLinkedList(16),
		Visited:         false,
		GraphType:       graph.GetType(),
		AppInfo:         nil,
	}
	//v.VertexPosition = graph.InsertVertex(v)
	return v
}

type Edge struct {
}
